import request from '@/utils/request'

// 获取当前用户人脸信息（判断是否已注册）
export function getUserFaceInfo() {
    return request({
        // url: '/api/face/currentUser',
        url: 'http://localhost:9033/api/face/currentUser',
        method: 'get'
    })
}

// 添加人脸信息
export function addUserFaceInfo(formData) {
    return request({
        url: 'http://localhost:9033/api/face/registerUserFace',
        method: 'put',
        data: formData,
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        timeout: 60000
    })
}

export function loginWithFace(formData) {
    return request({
        url: 'http://localhost:9033/api/face/login',
        method: 'post',
        data: formData,
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        timeout: 60000
    })
}
